package cn.flying.cloud.oauth.web;

import javax.annotation.Resource;

import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import cn.flying.cloud.base.common.constants.Constants;
import cn.flying.cloud.base.redis.service.RedisService;

/**
 * @author: admin
 * @date: 2024年05月23日 11:10
 * @version: 1.0
 */
@Component
public class DemoCode implements ApplicationRunner {

    @Resource
    private RedisService redisService;

    /**
     * Callback used to run the bean.
     *
     * @param args incoming application arguments
     * @throws Exception on error
     */
    @Override
    public void run(ApplicationArguments args) throws Exception {
        String code = "1234";
        redisService.set(Constants.AUTH_CODE + ":sms:code:18333616962", code);
    }
}
